package com.sikaryofficial.workbench.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sikaryofficial.workbench.domain.dto.req.membership.MembershipListReq;
import com.sikaryofficial.workbench.domain.dto.resp.membership.MembershipPolicyDTO;
import com.sikaryofficial.workbench.domain.entity.MembershipPolicy;
import com.sikaryofficial.workbench.mapper.MembershipPolicyMapper;
import com.sikaryofficial.workbench.service.IMembershipPolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 会员激励政策Service业务层处理
 * 
 * @author wuweihong
 * @date 2024-10-18
 */
@Service
public class MembershipPolicyServiceImpl extends ServiceImpl<MembershipPolicyMapper, MembershipPolicy> implements IMembershipPolicyService
{

	@Autowired
	private MembershipPolicyMapper membershipPolicyMapper;

	@Override
	public IPage<MembershipPolicyDTO> membershipList(Page<MembershipPolicyDTO> customPage, MembershipListReq req) {
		return membershipPolicyMapper.membershipList(customPage, req);
	}

	@Override
	public MembershipPolicyDTO selectMembershipPolicyByUser(Long userId) {
		return membershipPolicyMapper.selectMembershipPolicyByUser(userId);
	}
}
